package com.example.testjacocoandsonar;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController()
public class FirstController {

    @GetMapping("/hello")
    public String hello(@RequestParam("param") String param) {
        if (param.equals("testIf")) {
            return "hello result from server";
        } else if ("testElse".equals(param)){
            return "hi result from server";
        } else {
            return "error param";
        }
    }
}
